package com.zkthink.ceres.order.dto;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.zkthink.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import lombok.Data;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import java.io.Serializable;

/**
 * <p>
 * 实体类
 * 每个子订单下对应的商品
 * </p>
 *
 * @author JustArgo
 * @since 2020-05-17
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@ApiModel(value = "OrderProductSaveDTO", description = "每个子订单下对应的商品")
public class OrderProductSaveDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 店铺id
     */
    @ApiModelProperty(value = "店铺id")
    @NotNull(message = "店铺id不能为空")
    private Long storeId;
    /**
     * 订单id
     */
    @ApiModelProperty(value = "订单id")
    @NotNull(message = "订单id不能为空")
    private Long orderId;
    /**
     * 商品id
     */
    @ApiModelProperty(value = "商品id")
    private Long productId;
    /**
     * 商品名称
     */
    @ApiModelProperty(value = "商品名称")
    @Length(max = 50, message = "商品名称长度不能超过50")
    private String productName;
    /**
     * 商品sku对应的主键id
     */
    @ApiModelProperty(value = "商品sku对应的主键id")
    private Long skuId;
    /**
     * 白色 37码
     */
    @ApiModelProperty(value = "白色 37码")
    @Length(max = 200, message = "白色 37码长度不能超过200")
    private String skuNameStr;
    /**
     * sku对应的图片
     */
    @ApiModelProperty(value = "sku对应的图片")
    @NotEmpty(message = "sku对应的图片不能为空")
    @Length(max = 200, message = "sku对应的图片长度不能超过200")
    private String skuImg;
    /**
     * 购买数量
     */
    @ApiModelProperty(value = "购买数量")
    private Integer buyNum;
    /**
     * 重量，单位(千克)
     */
    @ApiModelProperty(value = "重量，单位(千克)")
    @NotNull(message = "重量，单位(千克)不能为空")
    private Double weight;
    /**
     * 原价
     */
    @ApiModelProperty(value = "原价")
    private Long applyPrice;
    /**
     * 销售价
     */
    @ApiModelProperty(value = "销售价")
    private Long sellPrice;
    /**
     * 需要支付的运费
     */
    @ApiModelProperty(value = "需要支付的运费")
    private Long postPay;
    /**
     * 逻辑删除：1-删除 0-未删除
     */
    @ApiModelProperty(value = "逻辑删除：1-删除 0-未删除")
    @NotNull(message = "逻辑删除：1-删除 0-未删除不能为空")
    private Integer isDelete;

}
